<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js"></script>
</head>

<body>
    <div id="demo">
        <p>count: {{count}}</p>
        <p>d: {{a.b.c.d}}</p>
        <p>arr: {{arr}}</p>
        <p><button @click="count++">count+</button></p>
        <p><button @click="a.b.c.d = 900">change d</button></p>
        <p><button @click="arr=[100,200,300]">改变数组自身</button></p>
        <p><button @click="arr[0] = 88">通过下标改变数组的元素值</button></p>
        <p><button @click="arr.splice(0,1,88)">修改数组第0个元素</button></p>
    </div>
    <script>
        const vm = new Vue({
            el: '#demo',
            data: {
                count: 0,
                arr: [0, 1, 2, 3],
                a:{
                    b:{
                        c:{
                            d:100
                        }
                    }
                }
            }
        })
        console.log('vm: ', vm)
    </script>
</body>

</html>